public class Prog {
    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        //myLinkedList.createList();

        myLinkedList.addLast(1);
        myLinkedList.addLast(2);
        myLinkedList.addLast(3);
        myLinkedList.addLast(4);
        myLinkedList.show();
        myLinkedList.remove(2);
        myLinkedList.show();
        System.out.println(myLinkedList.size());//4
        System.out.println(myLinkedList.contains(3));//false
        myLinkedList.clear();
        myLinkedList.show();




        MyArrayList myArrayList=new MyArrayList();
        myArrayList.add(0,1);
        myArrayList.add(1,2);
        myArrayList.add(2,3);
        myArrayList.add(3,4);
        myArrayList.display();
        System.out.println(myArrayList.contains(4));
        System.out.println(myArrayList.search(3));
        System.out.println(myArrayList.getPos(1));
        System.out.println(myArrayList.size());
        myArrayList.remove(2);
        myArrayList.display();
    }
}
